@import "./common/var.scss";
@import "./mixins/mixins.scss";

[class*="rb-col-"] {
  float: left;
  box-sizing: border-box;
}

.rb-col-0 {
  display: none;
}

@for $i from 0 through 24 {
  .rb-col-#{$i} {
    width: (1 / 24 * $i * 100) * 1%;
  }

  .rb-col-offset-#{$i} {
    margin-left: (1 / 24 * $i * 100) * 1%;
  }

  .rb-col-pull-#{$i} {
    position: relative;
    right: (1 / 24 * $i * 100) * 1%;
  }

  .rb-col-push-#{$i} {
    position: relative;
    left: (1 / 24 * $i * 100) * 1%;
  }
}

@include res(xs) {
  .rb-col-xs-0 {
    display: none;
  }
  @for $i from 0 through 24 {
    .rb-col-xs-#{$i} {
      width: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-xs-offset-#{$i} {
      margin-left: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-xs-pull-#{$i} {
      position: relative;
      right: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-xs-push-#{$i} {
      position: relative;
      left: (1 / 24 * $i * 100) * 1%;
    }
  }
}

@include res(sm) {
  .rb-col-sm-0 {
    display: none;
  }
  @for $i from 0 through 24 {
    .rb-col-sm-#{$i} {
      width: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-sm-offset-#{$i} {
      margin-left: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-sm-pull-#{$i} {
      position: relative;
      right: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-sm-push-#{$i} {
      position: relative;
      left: (1 / 24 * $i * 100) * 1%;
    }
  }
}

@include res(md) {
  .rb-col-md-0 {
    display: none;
  }
  @for $i from 0 through 24 {
    .rb-col-md-#{$i} {
      width: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-md-offset-#{$i} {
      margin-left: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-md-pull-#{$i} {
      position: relative;
      right: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-md-push-#{$i} {
      position: relative;
      left: (1 / 24 * $i * 100) * 1%;
    }
  }
}

@include res(lg) {
  .rb-col-lg-0 {
    display: none;
  }
  @for $i from 0 through 24 {
    .rb-col-lg-#{$i} {
      width: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-lg-offset-#{$i} {
      margin-left: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-lg-pull-#{$i} {
      position: relative;
      right: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-lg-push-#{$i} {
      position: relative;
      left: (1 / 24 * $i * 100) * 1%;
    }
  }
}

@include res(xl) {
  .rb-col-xl-0 {
    display: none;
  }
  @for $i from 0 through 24 {
    .rb-col-xl-#{$i} {
      width: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-xl-offset-#{$i} {
      margin-left: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-xl-pull-#{$i} {
      position: relative;
      right: (1 / 24 * $i * 100) * 1%;
    }

    .rb-col-xl-push-#{$i} {
      position: relative;
      left: (1 / 24 * $i * 100) * 1%;
    }
  }
}